package com.example.demo.controller.websocket;

import com.example.demo.entity.User;
import com.example.demo.service.WebSocketServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.websocket.server.ServerEndpoint;
import java.util.HashMap;
import java.util.Map;

/**
 * @author 高俊
 * @create 2021-08-2021/8/16-15:03
 */
@Controller
public class WebSocketController {


    @RequestMapping("/")
    public String index(){
        return "login";
    }

    @RequestMapping("/login")
    public String login(User user, HttpServletRequest request){
        Map<String, Object> map = new ModelMap();
        map.put("user",user);
        return "target";
    }

    public void webSocket(){
    }

}
